package com.last1mile.dao.interfaces;

import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.last1mile.pojo.StreetDO;

@Repository
public interface StreetDao {

    
    Integer insert(StreetDO record);

    
    int updateByPrimaryKey(StreetDO record) throws SQLException;

    
    int updateByPrimaryKeySelective(StreetDO record) throws SQLException;

    
    StreetDO selectByPrimaryKey(Integer id) throws SQLException;

    /**
     * 根据街区父ID（区域ID）来查找其下的所有街区
     * 
     * @param streetUpId 街区父ID（区域ID）
     * @return
     * @throws SQLException
     */
    List<StreetDO> selectByStreetUpId(String streetUpId) throws SQLException;
    
    /**
     * 根据街区父ID（区域ID）和街区名来查找街区是否存在
     * @param streetUpId
     * @param cnName
     * @return
     * @throws SQLException
     */
    StreetDO selectByStreetUpIdAndCnName(String streetUpId,String cnName);

   
    int deleteByPrimaryKey(Integer id) throws SQLException;
    
    

}
